package gaff.mybatis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/blogs")
public class BlogController {

    @Autowired
    private BlogMapper blogMapper;

    @RequestMapping(value = "/{id}", method = RequestMethod.GET)
    public Blog getUser(@PathVariable Integer id) {
//        return blogMapper.selectBlog(id);
        return blogMapper.selectBlogTitle(id);
    }

}